package com.gph.saviorframework.es.example.entities;

import com.gph.saviorframework.es.annotations.Document;

import com.gph.saviorframework.es.annotations.Field;
import com.gph.saviorframework.es.annotations.DateFormat;
import com.gph.saviorframework.es.annotations.FieldIndex;
import com.gph.saviorframework.es.annotations.FieldType;
import org.springframework.data.annotation.Id;

import java.util.Date;

/**
 * 创建人   iscas-qd
 * 创建时间  9:37
 * ==============================================
 * 类说明：
 * <p>
 * ==============================================
 * 修改记录
 * 修改人          修改时间             修改内容
 * 郭培辉          9:37             创建
 * ==============================================
 */
@Document(indexName = "document",type = "document")
public class DocumentEntity {

    @Id
    private String id;

    @Field(type = FieldType.String,index = FieldIndex.analyzed,
            analyzer = "ik_max_word",searchAnalyzer = "ik_max_word",store = true)
    private String title;

    @Field(type = FieldType.String,index = FieldIndex.analyzed,
            analyzer = "ik_max_word",searchAnalyzer = "ik_max_word",store = true)
    private String content;

    private Date created;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreated() {
        return created;
    }

    public void setCreated(Date created) {
        this.created = created;
    }
}
